b0037eb033465a1a141e6c6b54c7141d88efb694,enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java,HighlyAvailableGraphDatabase,createTxHook,#,239
Before Change
// Here we decide whether to start in compatibility mode or mode or not
//noinspection deprecation
if ( !config.get( HaSettings.coordinators ).isEmpty() &&
!config.get( HaSettings.coordinators ).get( 0 ).toString().trim().equals( "" ) )
{
compatibilityMode = true;
compatibilityLifecycle = new LinkedList<>();
Switchover switchover = new ZooToPaxosSwitchover( life, paxosLife, compatibilityLifecycle,
clusterEventsDelegateInvocationHandler, memberContextDelegateInvocationHandler,
clusterMemberAvailabilityDelegateInvocationHandler, localClusterEvents,
localMemberContext, localClusterMemberAvailability );
ZooKeeperHighAvailabilityEvents zkEvents =
new ZooKeeperHighAvailabilityEvents( logging, config, switchover );
compatibilityLifecycle.add( zkEvents );
memberContextDelegateInvocationHandler.setDelegate(
new SimpleHighAvailabilityMemberContext( zkEvents.getInstanceId() ) );
clusterEventsDelegateInvocationHandler.setDelegate( zkEvents );
clusterMemberAvailabilityDelegateInvocationHandler.setDelegate( zkEvents );
// Paxos Events added to life, won't be stopped because it isn't started yet
paxosLife.add( localClusterEvents );
}
else
{
memberContextDelegateInvocationHandler.setDelegate( localMemberContext );
clusterEventsDelegateInvocationHandler.setDelegate( localClusterEvents );
clusterMemberAvailabilityDelegateInvocationHandler.setDelegate( localClusterMemberAvailability );
}
members = new ClusterMembers( clusterClient, clusterClient, clusterEvents,
After Change
memberContextDelegateInvocationHandler.setDelegate( localMemberContext );
clusterEventsDelegateInvocationHandler.setDelegate( localClusterEvents );
clusterMemberAvailabilityDelegateInvocationHandler.setDelegate( localClusterMemberAvailability );
members = new ClusterMembers( clusterClient, clusterClient, clusterEvents,
new InstanceId( config.get( ClusterSettings.server_id ) ) );